import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
import registerServiceWorker from './registerServiceWorker';
import './css/style.css'

import { BrowserRouter as Router } from 'react-router-dom';
import router from './router';
import Header from './components/Header'

// ReactDOM.render(<App />, document.getElementById('root'));
ReactDOM.render(
  <Router router={ router }>
    <React.Fragment>
      <Header />
      { router }
    </React.Fragment>
  </Router>,
  document.getElementById('root')
);
registerServiceWorker();

if (module.hot) {
  module.hot.accept('./components/App', () => {
    ReactDOM.render(<App />, document.getElementById('root'))
  })
}
